"""
@author: ZY
@Time: 2021/10/07
"""
from Script.login import Login


class Header:
    """
    消息头封装
    """

    def __init__(self):
        self.B_token = Login.B_login()
        self.H5_token = Login.H5_login()

    def B_headers(self):
        """B端消息头封装
        """
        headers = {"Content-Type": "application/json",
                   "Authorization": "Bearer business={0}".format(self.B_token)}
        return headers

    def H5_headers(self):
        """C端消息头封装
        """
        headers = {"Content-Type": "application/json",
                   "Authorization": "Bearer user={0}".format(self.H5_token)}
        return headers


Header = Header()

if __name__ == '__main__':
    A = Header.B_headers()
    print(A)
    B = Header.H5_headers()
    print(B)
